using UnityEngine;

namespace WolfCarol.AvgToolkit.Config
{
    public class ConfigData
    {
        public FullScreenMode WindowMode;

        public int ScreenWidth;

        public int ScreenHeight;

        public int FrameRate;

        public ConfigData()
        {
            WindowMode = FullScreenMode.FullScreenWindow;
            ScreenWidth = 1920;
            ScreenHeight = 1080;
            FrameRate = 60;
        }
    }

    public abstract class ConfigManager : MonoBehaviour
    {
        public void SetWindowMode(FullScreenMode mode)
        {
            Screen.fullScreenMode = mode;
        }

        public void SetResolution(int width, int height)
        {
            Screen.SetResolution(width, height, Screen.fullScreen);
        }

        public void SetFrameRate(int frameRate)
        {
            Application.targetFrameRate = frameRate;
        }
    }
}
